package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Created by vizadi on 6/10/2014.
 */
public class ReaderHelper {
    public String getUserInput(String prompt){
        String inputLine = null;
        System.out.println(prompt+" ");
        try {
            BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
            inputLine= is.readLine();
            if (inputLine.length() == 0) return null;

        }
        catch(IOException e)
        {
            System.out.println("Invalid input. IOException: " + e);
        }

        return inputLine;
    }

}
